package com.jiuli.liping.service.impl;

import com.jiuli.liping.dao.ClassificationDao;
import com.jiuli.liping.dao.ProductDao;
import com.jiuli.liping.vo.Classification;
import com.jiuli.liping.vo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import com.jiuli.liping.service.ClassificationService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author zyl
 * Date  2020-03-25
 */
@Service
public class ClassificationServiceImpl implements ClassificationService {
    @Autowired
    private ClassificationDao classificationDao;

    @Autowired
    private ProductDao productDao;
    
    @Override
    public Classification get(String id){
        return classificationDao.get(id);
    }
    
    @Override
    public List<Classification> findList(Classification classification) {
        return classificationDao.findList(classification);
    }
    
    @Override
    public List<Classification> findAllList() {
        return classificationDao.findAllList();
    }
    
    @Override
    public int insert(Classification classification) {
        return classificationDao.insert(classification);
    }
    
    @Override
    public int insertBatch(List<Classification> classifications){
        return classificationDao.insertBatch(classifications);
    }
    
    @Override
    public int update(Classification classification) {
        return classificationDao.update(classification);
    }
    
    @Override
    public int delete(Classification classification) {
        return classificationDao.delete(classification);
    }

    @Override
    public List<Classification> getProductList() {
        return classificationDao.getProductList();
    }

    @Override
    public List<Classification> getProductByName(Product product) {
        return classificationDao.getProductByName(product);
    }

    @Override
    public List<Classification> getClassification() {
        return classificationDao.findAllList();
    }

    @Override
    public List<Product> getProjectByPid(Classification classification) {
        return productDao.getProjectByPid(classification);
    }
}
